package com.wsx.sky.dubbo.bean;

import com.wsx.sky.dubbo.Bean;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.util.Map;

/**
 * @author wangshuaixin
 * @Title: com.wsx.sky.dubbo.bean.DubboResponse
 * @Description: TODO
 * @date 2018/12/10
 */
@NoArgsConstructor
public class DubboResponse extends Bean {

    @Setter @Getter private int code = 200;
    @Setter @Getter private String msg;
    @Setter @Getter private Map<String, Object> datas;

    public DubboResponse(int code) {
        this.code = code;
    }

    public DubboResponse buildCode(int code) {
        this.code = code;
        return this;
    }
    public DubboResponse buildMsg(String msg) {
        this.msg = msg;
        return this;
    }
}
